package com.zxg.zbc.domain;

import java.io.Serializable;

import com.zxg.zbc.dal.query.BasePagerQuery;

public class UUIIResult implements Serializable {

  /**
   * 
   */
  private static final long serialVersionUID = 1L;

  int                       curPage          = 1;

  int                       pageCount        = 1;

  int                       count            = 0;

  boolean                   success          = true;

  String                    message          = "";

  boolean                   hasRecords       = true;

  Object                    results;

  public int getCurPage() {
    return curPage;
  }

  public void setCurPage(int curPage) {
    this.curPage = curPage;
  }

  public int getPageCount() {
    return pageCount;
  }

  public void setPageCount(int pageCount) {
    this.pageCount = pageCount;
  }

  public int getCount() {
    return count;
  }

  public void setCount(int count) {
    this.count = count;
  }

  public boolean isSuccess() {
    return success;
  }

  public void setSuccess(boolean success) {
    this.success = success;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public boolean isHasRecords() {
    return hasRecords;
  }

  public void setHasRecords(boolean hasRecords) {
    this.hasRecords = hasRecords;
  }

  public Object getResults() {
    return results;
  }

  public void setResults(Object results) {
    this.results = results;
  }

  public UUIIResult() {
  }
  
  public UUIIResult(Object res) {
    this.results = res;
  }

  public UUIIResult(Boolean success, Object res, String message) {
    this.success = success;
    this.results = res;
    this.message = message;
  }

  public UUIIResult(Boolean success, Object res, String message, BasePagerQuery pageQuery) {
    this.success = success;
    this.results = res;
    this.message = message;
    this.count = pageQuery.getCount();
    this.curPage = pageQuery.getCurPage();
    this.pageCount = pageQuery.getTotalPage();
  }

  public UUIIResult(Object res, BasePagerQuery pageQuery) {
    this.results = res;
    this.count = pageQuery.getCount();
    this.curPage = pageQuery.getCurPage();
    this.pageCount = pageQuery.getTotalPage();
  }

  public UUIIResult(int curPage, int pageCount, Object res, String message) {
    this.results = res;
    this.curPage = curPage;
    this.pageCount = pageCount;
    this.message = message;
  }

  public UUIIResult(boolean success, String message) {
    this.success = success;
    this.message = message;
  }

  public UUIIResult(boolean success, boolean hasRecords, String message) {
    this.success = success;
    this.hasRecords = hasRecords;
    this.message = message;
  }
}